<template>
  <div class="footer">
    <el-button @click="cancel">取消</el-button>
    <el-button type="primary" :disabled="isDisabled">
      <pop-confirm name="确认" :popConfirmConfig="popConfig"> </pop-confirm>
    </el-button>
  </div>
</template>

<script lang="ts" setup>
import { computed, defineProps, defineEmits } from "vue"
import popConfirm from "@/baseUI/popConfirm/src/index.vue"
import { popConfirmConfig } from "@/baseUI/popConfirm/config/config"
import { useStore } from "@/store"

const emit = defineEmits(["cancel", "confirm"])
const props = defineProps(["middleRef"])
const store = useStore()
const cancel = () => {
  console.log("reff.value:", props)
}
// const confirm = () => emit("confirm")
const isDisabled = computed(() => store.state.isDialogConfim)
const popConfig = computed(() => ({
  ...popConfirmConfig,
  confirmFn: () => {
    console.log(6673133)
    emit("confirm")
  }
}))
</script>
